<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../include/taglib.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="../../include/inhead.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="keywords" content="E爱车 洗车 到店洗车" />
<meta name="description" content="E爱车" />
<link rel="shortcut icon" href="${ctx}/static/imges/favicon.ico" />
<title>我的车险填写信息</title>
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/washCar.css" />


<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="${ctx}/static/js/autoinn/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery.raty.js"></script>
<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery.placeholder.js"></script>
<script type="text/javascript" src="${ctx}/static/js/autoinn/common.js"></script>
<script type="text/javascript" src="${ctx}/static/js/autoinn/washCar.js"></script>
<link type="text/css" rel="stylesheet"
	href="${ctx}/static/tp/uploadify/css/uploadify.css" />
<script src="${ctx}/static/tp/uploadify/jquery.uploadify-3.1.js"
         
	type="text/javascript"></script>
	<script type="text/javascript">
	src="${ctx}/static/tp/uploadify/jquery.uploadify.js"
	
	</script>
<!-- <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script> -->

<style type="text/css">
			body{
				background-color: #f0efed;
			}
			
			.container{
				padding-left: 0px;
				padding-right: 0px;
			}
			
			.row{
				margin-left: 0px;
				margin-right: 0px;
			}
			
			.list-group-item:first-child{
				border-top-left-radius: 0px;
				border-top-right-radius: 0px;
			}
			
			.list-group-item:last-child{
				border-bottom-right-radius: 0px;
				border-bottom-left-radius: 0px;
			}
			
			.active a{
				color: #EF8A55;
			}
			
			a:hover{
				color: #919191;
				text-decoration: none;
			}
		</style>
			<script type="text/javascript">
	
	
	
	</script>
	
	</head>
	

	
	
<body>
	<div class="container">
		<div
			class="orange-orange-a row pf text-center f14 border-1 bdc-e6e6e6 bgc-f8f8f8 pt-5 pb-5 z99 w h45 line-height-35 pr"
			style="left: 0; top: 0;">
			<div class="col-xs-4 line-height-35 text-left pl-15 pr-0 pt-0">
			</div>
			<div class="col-xs-4 pr-0 pl-0 text-center">我的车险填写信息</div>
		</div>
		<div class="pb-50 pt-50 row pl-15 pr-15">
			<form id="myform" name="myform" method="post"
			 enctype="multipart/form-data"
				action="${ctx}/weixin/f/autoinn/bx/userRegister/add">
				
                 <input type="hidden" id="wxaccount" name="wxaccount" value="${wxaccount}"/>
				 <input type="hidden" id="openid" name="openid" value="${openid }" />
				 <input type="hidden" id="customer_id" name="customer_id" value="${customer_id}" />
				<div class="col-xs-12 pl-0 pr-0 pt-10">
					<div class="co1 pt-20 pl-5 pb-10 text-center">为方便商家与您联系,请将信息填写完整</div>
					<div class="form-group">
						<label class="control-label sr-only" for="phone" id="xingming">姓名</label>
						<div class="input-group">
							<span class="input-group-addon"><i class="fa fa-male"></i></span>
							<input type="text" class="form-control h35" id="nickname"
								name="nickname" placeholder="填写姓名" maxLength="4">

						</div>
					</div>
					<div class="form-group">
						<label class="control-label sr-only" for="phone">手机号</label>
						<div class="input-group">
							<span class="input-group-addon"><i class="fa fa-phone"></i></span>
							<input type="text" class="form-control h35" id="phone"
								name="phone" placeholder="填写手机号" maxLength="11">
						</div>
					</div>
					
					<!-- <div class="form-group">
						<label class="control-label sr-only" for="phone">验证码</label>
						<div class="input-group">
						<div id='waitminute' style="display: none;">60</div>
							<span class="input-group-addon"><i class="fa fa-lock"></i></span>
							<input type="text" class="form-control h35" id="y"
								name="y" placeholder="填写验证码">
								 <span class="input-group-btn">  
			                   <button id="yzm" class="btn btn-default" type="button"  onclick="getuserregistercode()" >获取验证码</button>  
			                </span> 
						</div>
						
					</div>
						 -->				
					
					
					<div class="form-group">
						<label class="control-label sr-only" for="phone">车牌</label>
						<div class="input-group">
							<span class="input-group-addon"><i class="fa fa-futbol-o"></i></span>
							<input type="text" class="form-control h35" id="brand"
								name="brand" placeholder="填写车牌">
						</div>
						
					</div>
					
					<div class="form-group">
						<label class="control-label sr-only" for="phone">车型</label>
						<div class="input-group">
							<span class="input-group-addon"><i class="fa fa-bus"></i></span>
							<input type="text" class="form-control h35" id="motorcycle"
								name="motorcycle" placeholder="填写车型">
						</div>						
					</div>
				</div>
				<div style="margin-bottom: 15px" id ="fileQueue" >			
				<input type="file"  id="picFile"   name="pictureone" style="display: inline; width: 180px" />上传上年保单(交强险)	<br>														
					
				<input type="file"  id ="picFile2" name="picturetwo" style="display: inline; width: 180px"/>	上传上年保单(商业险)		
					
				</div>
			
				
				<div class="col-xs-12 pl-0 pr-0 pt-10 pb-20">
					<input class="btn btn-orange btn-block " type="submit"
						onclick="return onclik()" text="保存" />

				</div>
				
				
			</form>
		</div>
	</div>

	<script type="text/javascript">
            var PARENT_URL='',
                ERROR_MSG = '',
                SUCCESS_MSG = '',
                INFO_MSG = '',
                WARNING_MSG = '';
        </script>


	<script type="text/javascript">
	
		function onclik(){								
		    var nickname=document.getElementById("nickname").value;
			   if(nickname == null || nickname == ""){
				   alert("请输入姓名！");
				   return false ;
			   }
			   if(nickname.length() >= 3){
				    alert("昵称最多3位");
				    return false;
				}

			   var phone=document.getElementById("phone").value;
			   if(phone == null || phone == ""){
				   alert("请输入电话号码！");
				   return false ;
			   }
			   var premium=document.getElementById("premium").value;
			   if(premium == null || premium == ""){
				   alert("请输入保费计算！");
				   return false ;
			   }
			   var brand=document.getElementById("brand").value;
			   if(brand == null || brand == ""){
				   alert("请输入品牌！");
				   return false ;
			   }
			   var motorcycle=document.getElementById("motorcycle").value;
			   if(motorcycle == null || motorcycle == ""){
				   alert("请输入车型！");
				   return false ;
			   }
			    			   			    			   			    			 
		}
		
		function uoo(){
			

		}
		/*
                 
					function isExist()
					{
						var	phone = $('#phone').val();
						var Mobile=/^(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/;
						
					    if(phone=='' ||phone.length!=11)
						{
					    	 $.Global.Notice.WarningTopNotice('请输入正确的手机号码');
						  $('#phone').focus();
						  return;
						}
					    if(!Mobile.test(phone)){
					    	 $.Global.Notice.WarningTopNotice('请输入正确的手机号码');
					  	  $('#phone').focus();
					  	  return;
					    }
						$.ajax({
								type : "POST",
								url :'${ctx}/weixin/f/autoinn/bx/userRegister/findPhone',
								data : {
									phone : phone
								},
								dataType: "json",    
								success : function(json)
								{
									
									if(json.code==0)
								   {
										getuserregistercode();
								   }else if(json.code==1)
								   {
									   $.Global.Notice.WarningTopNotice("请输入正确的手机号码"); 
								   }else{
									   $.Global.Notice.WarningTopNotice("非微信请求"); 
								   } 
								},
								error:function()
								{ 
									$.Global.Notice.ErrorTopNotice("服务器错误"); 
								}
						});
					}

                           */


			var timeID;
			//获取验证码
			function getuserregistercode()
			{
			     
			phone = $('#phone').val();
			var Mobile=/^(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/;
			if(phone=='' ||phone.length!=11)
			{
				$.Global.Notice.WarningTopNotice('请输入正确的手机号码');
			  $('#phone').focus();
			  return;
			}
			if(!Mobile.test(phone)){
				$.Global.Notice.WarningTopNotice('请输入正确的手机号码');
				  $('#phone').focus();
				  return;
			}
			$('#yzm').removeAttr('onclick');
			var time=parseInt($('.waitminute').text());
			timeID = window.setInterval(daojishi,1000);
			$.ajax({
			        type : "POST",
			        url :'${ctx}/weixin/f/autoinn/bx/userRegister/getuserregistercode',
			        data :'phone='+phone,
			        dataType: "json",  
			        success : function(json)
			        { 
			            if(json.code==0)
			            {
			            	$.Global.Notice.InfoTopNotice('验证码已发送');
			            }else if(json.code==1){
			              var seconds=json.seconds;
			              $('#waitminute').text(seconds);
               $.Global.Notice.InfoTopNotice('请等待'+seconds+'分钟');
			              var time=parseInt($('#waitminute').text());
			              timeID = window.setInterval(daojishi,1000);    
			            }else{
			            	$.Global.Notice.WarningTopNotice(json.msg);
			            }
			 
			        },
			        error:function()
			        {
			                $('.growlUI').fadeOut(1800);  
			        }
			     });
			
			
			  function daojishi()
		        {
		          if (time == 0) {                
		              window.clearInterval(timeID);//停止计时器
		              $("#yzm").removeAttr("disabled");//启用按钮
		              $("#yzm").val("重新发送验证码");
		          }
		          else {
		              $("#yzm").text( time + "秒");
		              time--;
		          }
		        }
			  }
			
			
			
			
			</script>
			
			
			
			
			</body>
</html>